package com.ylfstu.Homework.homework05;

public class Scientist extends Employee{
    private double bonus;

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    public Scientist(String name, int age, Double sal) {
        super(name, age, sal);
    }

    @Override
    public void PrintAllYearSal() {
        System.out.println(getName() + "全年工资为" + (getSal() * 12 + bonus));
    }
}
